home *** CD-ROM | disk | FTP | other *** search
/ Hot Sound & Vision 2 / Hot Sound & Vision 2.img / utils / dmp301.doc < prev    next >
Text File  |  1994-07-03  |  23KB  |  561 lines

  1.  
  2.  
  3.                                  DMP.DOC
  4.  
  5.              Documentation for the Dual Module Player v3.00
  6.  
  7.                    Copyright (C) 1992,1994 Otto Chrons
  8.  
  9.  
  10.  
  11.     Dual Module Player is a program for playing music modules on different
  12.     sound systems on IBM PC compatible machines. It uses DSMI sound
  13.     programming interface (Digital Sound & Music Interface) to achieve
  14.     high quality sound and wide sound card support.
  15.  
  16.     DMP is cardware so you can freely copy it to your friends and
  17.     distribute it to BBSes etc. If you like DMP you should send me a
  18.     postcard!
  19.  
  20.  
  21.     Currently DMP supports following module formats:
  22.  
  23.  
  24.         MOD,NST     The original Amiga module format (SoundTracker,
  25.                     NoiseTracker). Also supported by many PC trackers.
  26.                     Original format supported only 4 channels but many
  27.                     variants can support up to 32 channels.
  28.  
  29.         STM,S3M     Scream Tracker format. S3M can support up to 16
  30.                     channels while STM is limited to 4.
  31.  
  32.         669         Composer669 module format using 8 channels.
  33.  
  34.         FAR         Farandole tracker format capable of using 16 channels.
  35.  
  36.         MTM         MultiTracker format. It's a MOD variant with up to 32
  37.                     channels.
  38.  
  39.         AMF         DSMI's internal module format. You can convert all the
  40.                     previous formats to AMF with M2AMF but not vice versa.
  41.                     Using AMF format saves you disk space because AMFs are
  42.                     usually smaller than other module formats. DMP can
  43.                     also load AMFs faster than other formats. But remember
  44.                     that you cannot play AMFs on any other player, nor can
  45.                     you convert AMFs back to any other format.
  46.  
  47.  
  48.  
  49.     DMP is a simple program without any fancy graphics or interactive file
  50.     selection menus. Most DMP options can be set with command line
  51.     parameters, or by setting them into DMP envrionment variable or
  52.     DMP.INI setup file.
  53.  
  54.  
  55.     This is the command line syntax of DMP:
  56.  
  57.  
  58.         DMP [options] [modulename] [@listfile] [options]
  59.  
  60.     where,
  61.  
  62.         [modulename]    Name of the module (or modules) to play.  Wild
  63.                         cards are allowed.
  64.  
  65.         [@listfile]     name of a file containing a list of module names.
  66.                         You can also use wild cards within the list file.
  67.  
  68.         [options]       DMP settings
  69.  
  70.                         -H,  -?         Show help screen about options.
  71.  
  72.                         -Sxxxx          Set playback rate (4000-60000) or
  73.                                         (4-60). Most sound devices can
  74.                                         only reproduce up to a certain
  75.                                         playback rate (like 44.1kHz) so
  76.                                         DMP will automatically adjust the
  77.                                         given sampling rate if it's too
  78.                                         high.
  79.  
  80.                         -Ixx            Set the sound card IRQ (interrupt)
  81.  
  82.                         -Pxxx           Set sound device port address.
  83.                                         This value is given in hexadecimal
  84.                                         notation (i.e. 220)
  85.  
  86.                         -Dx             Set sound card DMA channel.
  87.  
  88.                         -Cxx            Force sound device selection:
  89.  
  90.                                             1 for Sound Blaster
  91.                                             2 for Sound Blaster Pro
  92.                                             3 for PAS+
  93.                                             4 for PAS16
  94.                                             5 for SB16
  95.                                             6 for general DAC (Covox)
  96.                                             7 for Aria cards
  97.                                             8 for Windows Sound System & compat.
  98.                                               (like AudioTrix Pro)
  99.                                             9 for Gravis Ultrasound
  100.                                             10 for PC Speaker
  101.                                             11 for Stereo DAC (LPT1 & 2)
  102.                                             12 for Stereo-on-1 DAC
  103.  
  104.                         -M              Set card to mono mode. Default is
  105.                                         stereo mode if sound card supports
  106.                                         stereo output.
  107.  
  108.                         -8              Force 8-bit sound output. Sets
  109.                                         16-bit sound cards to 8-bit mode.
  110.                                         This mode is a little bit faster
  111.                                         but the quality is very poor
  112.                                         compared to 16-bit. See "Quality
  113.                                         mode".
  114.  
  115.                         -Q              Use Quality mode. See "Quality
  116.                                         mode".
  117.  
  118.                         -Axxx           Amplify by xxx. 31 is normal
  119.                                         volume. Should only be used with
  120.                                         Quality mode.
  121.  
  122.                         -Txxxxx         Set sound playback buffer size.
  123.                                         DMP automatically adjusts the
  124.                                         buffer size according to sample
  125.                                         size, stereo and sampling rate but
  126.                                         if you need larger buffer, you can
  127.                                         use this option.
  128.  
  129.                         -Nxx            Set default panning to xx. Most
  130.                                         module formats don't support
  131.                                         default panning, the channels are
  132.                                         either left or right. With this
  133.                                         option you can bring the channels
  134.                                         close to the middle position.
  135.                                         Value 0 means middle panning, 63
  136.                                         sets the channels as much apart as
  137.                                         possible and 100 forces surround
  138.                                         sound.
  139.  
  140.                         -Fxx            Select digital effect xx as the
  141.                                         default effect. Digital effects
  142.                                         are defined in DMP.INI
  143.  
  144.                         -E              Disable extended (BPM) tempos. Use
  145.                                         this option if you encounter tempo
  146.                                         problems with old modules.
  147.  
  148.                         -G              Use non-DMA download mode for
  149.                                         Gravis Ultrasound. If you
  150.                                         encounter problems with GUS
  151.                                         (samples sound incorrect), try
  152.                                         this option.
  153.  
  154.                         -GT             Use PC timer instead of GUS timer
  155.                                         for playback. If the music stops
  156.                                         wihtout a clear reason, it might
  157.                                         be a problem with GUS timer.
  158.  
  159.                         -L              Inhibit looping. If you are
  160.                                         playing just one module DMP will
  161.                                         by default loop the module
  162.                                         forever.
  163.  
  164.                         -O              Randomize the playing order of
  165.                                         modules.
  166.  
  167.                         -B              Disable EMS usage.
  168.  
  169.                         -Zxx            Use 25 or 50 row display
  170.  
  171.                         -W[command]     Run [command] after staring to
  172.                                         play the module. If you want to
  173.                                         give command line parameters to
  174.                                         [command], put quotation marks (")
  175.                                         around the option i.e.
  176.                                         "-Wdir *.mod"
  177.  
  178.                                         If [command] exits with error
  179.                                         level 68, DMP terminates
  180.                                         immediately.
  181.  
  182.                         -X              Inhibit all output. DMP writes
  183.                                         absolutely nothing on the screen.
  184.  
  185.  
  186.  
  187.  
  188.  
  189.                           Using default options
  190.                           ---------------------
  191.  
  192.  
  193.  
  194.     If you find yourself using the same options all the time you can make
  195.     them default options by setting up a DMP evironment variable or
  196.     including them into DMP.INI.
  197.  
  198.     For example,
  199.  
  200.         You always want to use quality mode and sampling rate of 22kHz and
  201.         mono mode, put following line into your AUTOEXEC.BAT
  202.  
  203.         SET DMP=-q -s22 -m
  204.  
  205.     NOTE!  You cannot override single letter options (-l,-o,-m,-q) with
  206.     command line parameters. All other options can be overriden.
  207.  
  208.     Alternatively you can use the CmdLine parameter in DMP.INI for same
  209.     purpose.
  210.  
  211.  
  212.  
  213.                       Setting up your sound system
  214.                       ----------------------------
  215.  
  216.     You may have to  give your soundcard's IRQ  number and/or port address
  217.     if DMP fails to find them. If you don't provide both values then DMP
  218.     will assume 220h for port address, and 7 for interrupt number. Giving
  219.     wrong address  will hang  your machine,  but wrong interrupt number
  220.     only stops the playing after a second. The "-C" option is useful if
  221.     you want to use some other card, than the one DMP automatically
  222.     detects.
  223.  
  224.  
  225.  
  226.                              Playing modules
  227.                              ---------------
  228.  
  229.     When you start DMP with a module name (or names) that has no
  230.     extension  DMP will try the default extensions defined in DMP.INI. If
  231.     DMP finds a file with one of the extensions it will automatically load
  232.     and play it. Automatic extensions feature doesn't work with wildcards,
  233.     however.
  234.  
  235.     You can also build up play lists for DMP (with an external shell
  236.     program for example). DMP reads this list file and scans each line for
  237.     a module name. There should be only one file name per line but you can
  238.     use wildcards. The name extension apply also for module names in play
  239.     list.
  240.  
  241.     Example:
  242.  
  243.         DMP beyond *.NST @goodmods
  244.  
  245.         goodmods is a text file containing following lines:
  246.  
  247.         occ-san
  248.         stars.mod
  249.         intro3
  250.  
  251.         DMP will play following modules: BEYOND.MOD, OCC-SAN.STM, STARS.MOD,
  252.         INTRO3.MOD and all .NST-files in the current directory.
  253.  
  254.  
  255.                       Playing modules from archives
  256.                       -----------------------------
  257.  
  258.     You can also play modules inside archives by specifying in DMP.INI how
  259.     to extract files from the archive. DMP will then extract ALL the files
  260.     in the archive to a temp directory and play them. Notice that DMP will
  261.     also try to play non-module files, possibly leading to a crash or
  262.     error message.
  263.  
  264.     The archive support in DMP is not very good or bulletproof, so be
  265.     careful when using it.
  266.  
  267.  
  268.                             Using stereo DACs
  269.                             -----------------
  270.  
  271.     If you have two DACs on LPT1 and LPT2 you can use them as one stereo
  272.     source with following command line:
  273.  
  274.         DMP -c11 ...
  275.  
  276.     Note that you don't have to specify port address, DMP automatically
  277.     reads the port addresses from BIOS data area.
  278.  
  279.     If you have a Stereo-on-1 DAC you can use it with following options:
  280.  
  281.         DMP -c12 -pXXX ...
  282.  
  283.     where XXX is the address of the DAC (LPT1 = 378)
  284.  
  285.  
  286.                      DMP configuration file DMP.INI
  287.                      ------------------------------
  288.  
  289.     DMP has a config file called DMP.INI. It should be placed in the same
  290.     directory with DMP.EXE but DMP will also find it if it's somewhere in
  291.     the PATH. See the file itself for explanations on config switches and
  292.     strings.
  293.  
  294.  
  295.                         DMP play screen and keys
  296.                         ------------------------
  297.  
  298.     After DMP has loaded the first module and started to play it you see
  299.     the playback screen. In this screen you can find a lot of information
  300.     on the currently playing module, like the song name, how much memory
  301.     is used by the module, where the player is currently playing etc.
  302.  
  303.     You also see channel specific information showing you the instrument
  304.     name that is playing on that track and also other sound parameters.
  305.     On the right are volume bars that give you an approximation of the
  306.     sound volume on that track.
  307.  
  308.     Under the channel information is a list of instrument names. It is
  309.     quite common that composers use this space for some messages instead
  310.     of real instrument names.
  311.  
  312.  
  313.     Pressing 'H' brings up a quick-help showing keys that control the
  314.     program.
  315.  
  316.         Keys:
  317.  
  318.                 P           Pause module playback. Pressing any key
  319.                             resumes.
  320.  
  321.                 1-9,0       Turn track 1-9 on/off. 0 turns selected track
  322.                             on/off.
  323.  
  324.                 S           Set selected track to solo mode i.e. all other
  325.                             tracks are muted. Pressing 'S' again on the
  326.                             same track unmutes other channels.
  327.  
  328.                 up/down     Select a track.
  329.  
  330.                 left/right  Jump to previous/next pattern.
  331.  
  332.                 F1-F10,+,-  Set playback volume.
  333.  
  334.                 [,]         Decrease/increase speed (module tempo).
  335.  
  336.                 {,}         Decrease/increase module BPM tempo.
  337.  
  338.                 L,M,R,U     Set panning to full left/middle/right or
  339.                             surround.
  340.  
  341.                 , .         Pan to left/right
  342.  
  343.                 F           Turn SB Pro filter on/off. Default is off.
  344.  
  345.                 V           Select real/fake volume bars. Default is real.
  346.  
  347.                 E           Select digital effect (not available on GUS).
  348.                             Shows a menu where you can select the effect
  349.                             with up/down or with numbers 0-9 and X.
  350.  
  351.                 N           Stop playing current module and load next module.
  352.  
  353.                 Z           Switch between 25- and 50-row screen.
  354.  
  355.                 D           DOS shell (write 'EXIT' to get back to DMP)
  356.  
  357.                 ESC         Exit DMP.
  358.  
  359.  
  360.  
  361.  
  362.  
  363.                           Technical information
  364.                           =====================
  365.  
  366.     DMP uses software mixing routines to play up to 32 different digital
  367.     sounds on one mono/stereo digital channel of your sound system. With
  368.     Gravis Ultrasound, however, DMP uses the GUS onboard processor to do
  369.     all the sound mixing. The software mixing routines are highly
  370.     optimized assembly language and there are multiple routines to achieve
  371.     best performance with any sound system.
  372.  
  373.  
  374.  
  375.                               Quality mode
  376.                               ------------
  377.  
  378.     Quality mode was orignally implemented only on 8-bit sounds cards to
  379.     overcome the dynamic limitation of 8-bits. It uses 16-bit mixing
  380.     routines to achieve 96dB dynamic range (instead of 48dB) and post
  381.     processes the 16-bit data into 8-bits with a look-up table that
  382.     amplifies the sound. Because of this post processing, the Quality mode
  383.     takes more processor power but it's worth it. To further amplify the
  384.     sound you can use '-Axx' command line option.
  385.  
  386.     For 16-bit cards there's no need to use Quality mode to improve the
  387.     quality of the sound. But with up to 32 channels the dynamics of
  388.     individual channels go worse i.e. the volume is lower. You can of
  389.     course use '-Axx' to amplify the sound but there is always a risk of
  390.     click and noise if the sound overruns. This is where 16-bit Quality
  391.     mode comes in. It uses a temporary 32-bit buffer to do the mixing and
  392.     post processes the buffer by clipping values that can't fit to
  393.     16-bits. Unlike 8-bit Quality mode, there is no default amplification
  394.     in 16-bit Quality mode. To overcome this DMP uses an autogain feature
  395.     that sets the amplification (like using '-Axx') to a level equal to a
  396.     4 channel music regardless of the channel count of the module. This
  397.     way even 16+ channel modules still sound as loud and clear as normal 4
  398.     channel MODs. You can still use '-Axx' to further amplify the volume.
  399.  
  400.  
  401.  
  402.                              Digital effects
  403.                              ---------------
  404.  
  405.     New to DMP 3.00 is the support for digital effects. Currently you can
  406.     do reverb/echo style of effects and simple lowpass filtering. These
  407.     effects are only available on sound systems where DMP does the mixing
  408.     in software (i.e. the final sound data can be post processed), so you
  409.     cannot use them with GUS.
  410.  
  411.     You can have up to 10 predefined effects (defined in DMP.INI) and
  412.     select between them while playing by pressing 'E' or with command line
  413.     parameter '-Fxx'.
  414.  
  415.  
  416.  
  417.                                  Filters
  418.  
  419.     You can use two different lowpass filters to filter the noise caused
  420.     by aliasing in mixing routines. These filters are really simple so
  421.     they don't use much processor power.
  422.  
  423.     Filter 1 algorithm is defined as:
  424.  
  425.             y(n) = 0.5*x(n) + 0.5*x(n-1)
  426.  
  427.     Filter 2 is:
  428.  
  429.             y(n) = 0.75*x(n) + 0.25*x(n-1)
  430.  
  431.     Of course the actual filter routines use simple additions and shifts
  432.     instead of floating point multiplications to achieve best possible
  433.     speed.
  434.  
  435.     See DMP.INI how to use these filters.
  436.  
  437.     By default DMP uses the Filter 2 (this can be changed in DMP.INI or
  438.     with '-Fxx' command line parameter).
  439.  
  440.  
  441.  
  442.                            Reverb/echo effects
  443.  
  444.     DMP uses a user definable reverb/echo engine to create effects from
  445.     massive reverbs to funny sounding echos. Here is the diagram of that
  446.     engine.
  447.  
  448.  
  449.      ┌─────┐                                    ┌────────┐
  450.      │Input├─────────────────────────────────┬──┤        │          ┌──────┐
  451.      └─────┘                   ┌────────┐    │  │ Filter ├──────────┤Output│
  452.         ┌──────────────────────┤        ├────│──┤        │          └──────┘
  453.         │        ┌─────────────┤ Filter │    │  └────────┘
  454.         │        │     ┌───────┤        ├─┐  │
  455.         │        │     │       └────────┘ │  │
  456.         │        │     │                  │  │
  457.         │        │     │                  │  │
  458.         │        │     │                  │  │
  459.         │        │     │                -----│
  460.         │        │     │        feedback\ G /│        G = gain
  461.  "echos"│        │     │                 \_/ │
  462.        / \      / \   / \                 │  │        D = delay
  463.       / G1\    / G2\ / G3\                │  │
  464.       -----    ----- -----                │  │
  465.         │        │     │                 ┌┴──┴┐
  466.         │        │     │                 │  + │
  467.         │        │     │                 └──┬─┘
  468.         │        │     │                    │
  469.         │        │     │                    │
  470.      D1 │     D2 │  D3 │                    │
  471.     ┌───┴────────┴─────┴───────────────┐    │
  472.   ┌─┤        delay line                │    │
  473.   │ └──────────────────────────────────┘    │
  474.   │                                         │
  475.   │                                         │
  476.   └─────────────────────────────────────────┘
  477.  
  478.  
  479.     The number of echos can be from one to eight and each has its own
  480.     position on the delay line and its own gain value. You can change the
  481.     number of echos and paramters for each echo in DMP.INI
  482.     [DigitalEffects] section. You can also set the "feedback" value.
  483.  
  484.     You can also use negative gain values to create a 180 degree phase
  485.     shift.
  486.  
  487.     The filters used in reverb are the same as in filter 1.
  488.  
  489.     Setting a reverb in DMP.INI looks like following:
  490.  
  491.     Effect1 = <effect_name> R <feedback> <echo 1 delay> <echo 1 gain> ...
  492.  
  493.  
  494.     See DMP.INI for examples on reverbs and echos.
  495.  
  496.  
  497.  
  498.                            Reverb performance
  499.  
  500.     Calculating one echo in reverb engine requires a few simple arithmetic
  501.     instructions and one multiplication. In addition calculating feedback
  502.     requires another multiplication. So with a 6 echo reverb the routine
  503.     must do seven multiplications and lots of simple instructions for EACH
  504.     AND EVERY SAMPLE from input. In comparison the mixing routines in the
  505.     actual sample playback engine require only a few simple instructions
  506.     per sample.
  507.  
  508.     Unless you have a powerful 486 it's not wise to use stereo mode
  509.     because this doubles the reverb overhead. Even on a 486/33 using
  510.     reverb with 44kHz stereo data can bring the machine on its knees. On
  511.     slower machines you will start to hear the playback buffer repeating
  512.     as DMP can't keep up with sound card DMA.
  513.  
  514.     Using simple echos requires a lot less processor computing power, it's
  515.     all dependant on the number of echos.
  516.  
  517.  
  518.  
  519.  
  520.                           Contacting the author
  521.                           =====================
  522.  
  523.  
  524.     If you have suggestions/questions/problems about DMP, feel free to
  525.     contact the author. Email is preferred.
  526.  
  527.  
  528.         Mail address:
  529.  
  530.             Otto Chrons
  531.             Vaajakatu 5 K 199
  532.             FIN-33720 TAMPERE
  533.             FINLAND
  534.  
  535.  
  536.         Internet e-mail:
  537.  
  538.             otto.chrons@cc.tut.fi
  539.  
  540.  
  541.  
  542.                        Getting new versions of DMP
  543.                        ---------------------------
  544.  
  545.     Newest version is always available at:
  546.  
  547.         BBS:
  548.         ----
  549.  
  550.             R.A. LAW         +358-37-5849007    19.2ZyX, v32bis
  551.  
  552.         Internet FTP:
  553.         -------------
  554.  
  555.             ftp.eng.ufl.edu  /pub/msdos/demos/music/pplayers
  556.  
  557.  
  558.     For a distribution site near you, check out SUPPORT.DMP.
  559.  
  560.     See DMP.REV for revision history.
  561.